/* 2017-05-10 遮罩层  超 start */

$(function(){
	$('#btn1').click(function(){
		$('#j_Mask').css({'display':'block'})
		$('#j_Customization').css({'display':'block'})
	})
	$('#j_fork').click(function(){
		$('#j_Mask').css({'display':'none'})
		$('#j_Customization').css({'display':'none'})
	})
	$('#close').click(function(){
		$('#popUp').css({'display':'none'})
		$('#j_Mask').css({'display':'none'})
	})
	$('#btn2').click(function(){
        aid              = $(this).attr('analyst_id');
        analyst_username = $(this).attr('analyst_username');
        status           = $(this).attr('status');
        direction        = $(this).attr('direction');
        if(status == 1){
            $('#gendancancle').show();
        }else{
            $('#gendancancle').hide();
        }
        $('#j_Mask').css({'display':'block'});
		$('#popUp').css({'display':'block'})
	})
})
/* 2017-05-10 遮罩层  超 end */

/* 左侧效果提交 */
$(function(){
     var jLi = $('.j_Li'),
         jA = $('.jA_1'),
         jDetails = $('.details')


    for(var i =0;i<jLi.length;i++){
        jLi[i].index = i;
        jLi[i].onmouseover = function(){
            jA[this.index].style.display ='none',
            jDetails[this.index].style.position = 'relative'
            jDetails[this.index].style.transition = 'all 1s'
            jDetails[this.index].style.top = '0px'
        }
        jLi[i].onmouseout = function(){
            jA[this.index].style.display ='block',
            jDetails[this.index].style.transition = 'all 0s'
            jDetails[this.index].style.position = 'absolute'
            jDetails[this.index].style.top = '-500px'
        }
    }
})

// 第一区域条形图
$(function () {
//    alert(data[0]);
    drawChart1(barChart_first,data[0]);
    drawChart1(barChart_second,data[1]);
});
// 条形图
function drawChart1(id,data) {
    return new Highcharts.Chart({
        chart: {
            renderTo: id,
            type: 'bar',
            borderRadius: 4,
            plotOptions: {            
                 // column: {
                 //     stacking: 'percent'        
                 //  }
            }
        },
        credits: {
            enabled: false
        },
        // 去掉右上角打印提示
        exporting:{
            enabled: false
        },
        title: {
            text: ''
        },
        xAxis: {
            categories: data.barName,
            gridLineWidth: 0,
            // 去掉刻度线
            tickWidth:0,
            // 去掉X轴
            lineWidth:0,
            labels: {
                style: {
                    fontSize: 14,
                    color: '#20222c'
                },
                align: 'top',
                x: 0,
                y: -20
            }
        },
        yAxis: {
            min: 0,
            title: {
                text: ''
            },
            gridLineWidth: 0,
            labels:{
                enabled:false
            }
        },
        legend: {
            reversed: true
        },
        plotOptions: {            
            column: {
                // pointPadding : 0.1
            },
            series: {
                stacking: 'null',
                pointWidth: 16
            },
            bar: {
                // 条形圆角
                borderRadius: 2,
                barHeight: 274
            }
        },
        tooltip:{
            enabled:false
        },
        series: [{
            name: '',
            data: data.barOne,
            barWidth: 274,
            label: {
                normal: {
                    show: true,
                    position: '[right]'
                }
            },
        },{
            name: '',
            data: data.barTwo
        }],
        colors:['#e1e9ed','#3ebbdf']
    }) 
}
 
// 第二区域仪表盘
// 左边扇形图
$(function () {
    var dataS=[' ',left1_red ];
    drawChartS(gauge1,dataS);
});
// 左边扇形
function drawChartS(id,data){
    return new Highcharts.Chart({
        chart: {
            renderTo: id,
            plotBackgroundColor: null,
            plotBorderWidth: 0,
            plotShadow: false
        },
        credits: {
            enabled: false
        },
        // 去掉右上角打印提示
        exporting:{
            enabled: false
        },
        title: {
            text: '',
            // align: 'center',
            // verticalAlign: 'middle',
            // y: 50
        },
        subtitle: {
            text: '<b>'+left1_red+'</b>%',
            verticalAlign: 'middle',
            y:94,
            x:14,
            style: {
                fontSize: 30+'px',
                fontWeight: 'bold'
            }

        },
        tooltip: {
            headerFormat: '{series.name}<br>',
            pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -50,
                    style: {
                        fontWeight: 'bold',
                        color: 'white',
                        textShadow: '0px 1px 2px black'
                    }
                },
                startAngle: -90,
                endAngle: 90,
                center: ['50%', '75%']
            },
            column: {
                cursor: 'pointer',
                pointPadding: 0.2,
                borderWidth: 0,
                pointWidth: 20,
               // maxPointWidth: 100 // 设置最大宽度

            }
        },
        series: [{
            type: 'pie',
            name: ' ',
            innerSize: '50%',
            data: [
                data,
                {
                    name: ' ',
                    y: left1_gray,
                    dataLabels: {
                        // 数据比较少，没有空间显示数据标签，所以将其关闭
                        enabled: false
                    }
                }
            ]
        }],
        colors: ['#00a8ee','#eceff4']
    })
}

// 右边环形
$(function () {
    var dataT1 = [{value:buynum,name:'多单数量'},{value:sellnum,name:'空单数量'}]
    var dataT2 = [{value:allProfitpoint,name:'总盈利点位'},{value:allLosspoint,name:'总亏损点位'}]
    oCpie("gauge3",['#7EB6EF','#3A4253'],allnum+"笔",'策略数量',dataT1)
    oCpie("gauge2",['#4BC8A6','#3A4253'],profitPoint+"点",'策略赢利点位',dataT2)
});

// 右边环形
function oCpie(id,color,t,s,data){
        var myChartB = echarts.init(document.getElementById(id))       
        option = {
            title: {
                text: t,
                subtext: s,
                x: 'center',
                y: '90'
            },       
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)",
                enterable:false,
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                data:['eee','ee']
            },
            series: [
                {
                    name:'',
                    type:'pie',
                    selectedMode: 'single',
                    selectedOffset:'10',  //偏移位置
                    avoidLabelOverlap:false,
                    // selected:true,
                    radius: ['56%', '70%'],
                    center: ['50%', '46%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            // show: true,
                            textStyle: {
                                fontSize: '18',
                                fontWeight: 'bold',
                                color:'#000'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data:data
                }
            ],
            color:color
        };
        myChartB.setOption(option);
}



/*第三区域柱状图 日报表*/
$(function () {
    //y:手数，k：笔数，totals:总笔数
    // profitsObj = {};
    // profitsObj.buyOrders = {};
    // profitsObj.sellOrders = {};
    // profitsObj.time = {};
    // profitsObj.time =['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31'];
    // profitsObj.buyOrders =[{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':3,'y':0.03,'totals':4},{'k':2,'y':0.1,'totals':2},{'k':0,'y':0,'totals':0},{'k':13,'y':0.41,'totals':13},{'k':21,'y':0.62,'totals':24},{'k':54,'y':0.71,'totals':54},{'k':20,'y':0.6,'totals':21},{'k':69,'y':2.38,'totals':72},{'k':12,'y':0.16,'totals':12},{'k':0,'y':0,'totals':0},{'k':17,'y':0.17,'totals':18},{'k':22,'y':0.5,'totals':22},{'k':34,'y':0.43,'totals':37},{'k':48,'y':0.67,'totals':55},{'k':58,'y':1.43,'totals':64},{'k':11,'y':0.34,'totals':11},{'k':0,'y':0,'totals':0},{'k':26,'y':1,'totals':26},{'k':60,'y':2.84,'totals':63},{'k':32,'y':0.35,'totals':36},{'k':24,'y':0.26,'totals':30},{'k':13,'y':0.15,'totals':22},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':26,'y':0.34,'totals':35},{'k':47,'y':1.07,'totals':57},{'k':21,'y':0.66,'totals':36},{'k':22,'y':0.57,'totals':24}];
    // profitsObj.sellOrders =[{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':1,'y':1,'totals':4},{'k':0,'y':0,'totals':2},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':13},{'k':3,'y':0.03,'totals':24},{'k':0,'y':0,'totals':54},{'k':1,'y':0.01,'totals':21},{'k':3,'y':0.07,'totals':72},{'k':0,'y':0,'totals':12},{'k':0,'y':0,'totals':0},{'k':1,'y':0.01,'totals':18},{'k':0,'y':0,'totals':22},{'k':3,'y':0.03,'totals':37},{'k':7,'y':0.07,'totals':55},{'k':6,'y':0.06,'totals':64},{'k':0,'y':0,'totals':11},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':26},{'k':3,'y':0.11,'totals':63},{'k':4,'y':0.04,'totals':36},{'k':6,'y':0.06,'totals':30},{'k':9,'y':0.13,'totals':22},{'k':0,'y':0,'totals':0},{'k':0,'y':0,'totals':0},{'k':9,'y':0.14,'totals':35},{'k':10,'y':0.27,'totals':57},{'k':15,'y':0.49,'totals':36},{'k':2,'y':0.04,'totals':24}];


    var data7 = {
                title : '日交易笔数',
                time : profitsObj.time,
                data : [
                    { name: '买入', data: profitsObj.buyOrders },
                    { name: '卖出', data: profitsObj.sellOrders }
                ]

            }
    drawChartR(zhuBar,data7);
    //drawChartR(zhuBar3,data7);
});

// 日报表
function drawChartR(id,data){
    var lineColor= ['#00a8ee','#f7512b'];
    var colors = ['#b6eaff','#fdd5d5'];
    var hoverColors = ['rgba(255,174,60,0.6)','rgba(124,183,255,0.6)'];
    for (var i = 0;i<data.data.length;i++) {
        data.data[i]=$.extend(true, data.data[i],{
            color:colors[i],
            borderColor:lineColor[i],
            states:{
                hover:{
                    color:hoverColors[i]
                }
            }
        });
    }
    // console.log(data)
    return new Highcharts.Chart({
        chart: {
            type: 'column',
            renderTo: id
        },
        title: {
            text: '',
            align: 'left',
            style: {
                fontSize: 14
            }
        },  
        colors: colors,
        credits: {
            enabled: false
        },
        exporting:{
            enabled: false
        },
        xAxis: {
            categories: data.time,
            // tickPositions: [ 1, 2 , 3 , 4, 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 ],
            // tickInterval: Math.ceil(data.time.length / 7),
            gridLineWidth: 0,
            // tickWidth: 16,
            labels: {
                autoRotation: false,
                style: {
                    fontSize: 14
                }
            }
        },
        yAxis: {
            min: 0,
            //tickPositions: [0, 5, 10, 15 , 20 , 25 ,30],
            tickAmount: 7,
            title: {
                text: ''
            },
            labels: {
                autoRotation: false,
                style: {
                    fontSize: 14
                }
            }
        },
        legend: {
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                pointWidth: 6
            }
        },
        tooltip: {
            formatter:function(){
                // var s=this.x+' '+this.series.name+' '+this.y+' 手/'+this.point.k+' 笔'+'，总数 '+this.point.total+' 手/'+this.point.totals+' 笔';
                var s=this.series.name+'：'+this.y+' 单，盈亏：'+this.point.k+' 点';
                return s;
            }
            
        },
        series:data.data
    });
}




/*第四区域条形图*/
//$(function(){
//  var myChartPie_a = echarts.init(document.getElementById('bar2'))
//      option = {
//          title: {
//              text: '',
//              subtext: ''
//          },
//          tooltip: {
//              trigger: 'axis',
//              axisPointer: {
//                  type: 'shadow'
//              },
//          },
//          legend: {
//              // data: ['2011年', '2012年']
//          },
//          grid: {
//              left: '3%',
//              right: '4%',
//              bottom: '3%',
//              containLabel: true
//          },
//          xAxis: {
//              show: false,
//              type: 'value',
//              boundaryGap: [0, 0.01],
//              x:50
//          },
//          yAxis: {
//              type: 'category',
//              // show:false,
//              data: ['2017-04-08','2017-04-07','2017-04-06','2017-04-07','2017-04-09','2017-04-07','2017-04-07'],
//              axisTick: {
//                  show: false
//              },
//              axisLine : {
//                  onZero: false,
//                  show:false
//              },
//          },
//          series: [
//              {
//                  name: '2011年',
//                  type: 'bar',
//                  barWidth: 18 ,
//                  padding: 2,
//                  itemStyle: {
//                      normal: {
//                          label : {
//                              show: true, 
//                              position: 'right',
//                              
//                              formatter: function (params) {
//                                // console.log(params)//这里输出params所有参数 需要什么下面自己拼
//                                  return params.data+'点';
//                              },
//                              
//                              textStyle: {
//                                  color: '#3E3E3E',
//                                  fontSize: 14
//                              }
//                          },
//                          //每个柱子的颜色即为colorList数组里的每一项，如果柱子数目多于colorList的长度，则柱子颜色循环使用该数组
//                          color: function (params){
//                              var colorList = [];
//                              // console.log(colorList[0])
//                                  if(params.data > 0){
//                                      return '#ff6839'
//
//                                  }else{
//                                     return '#b6eaff'
//                                  }
//                              return colorList[params.dataIndex];
//                          }
//                      }
//                  },
//                  data: [-20, 4, -2290, -7, 44, 30,10],
//                  // barGap: 50
//              }
//             
//          ],
//      };
//      myChartPie_a.setOption(option);
//})

// 第四区域饼图
// $(function () {
    // var dataP = [{one:16,two:20,three:10,four:30,five:20,six:10}]
    // drawChartB("piePie",dataP)
// });
// 饼图
function drawChartB(id,datastr){
    var myChartPie = echarts.init(document.getElementById(id));
    option = {
        title : {
            text: '交易品种',
            subtext: '',
            x:'left',
            y:'20'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        toolbox: {
            show : true,
        },
        calculable : true,
        series : [
            {
                name:'',
                type:'pie',
                radius : '50%',
                center: ['50%', '45%'],
                data:datastr
            }
        ],
        color: ['#F7A35C','#8FED7D','#434248','#7CB5EC','#8185E9','#F05D7F']
    };

     myChartPie.setOption(option);
}

/*第五区域月报表*/
$(function () {
    // monthProfits = {};
    // monthProfits.time = {};
    // monthProfits.data = {};
    // monthProfits.time =['2016-11-01','2016-12-01','2017-01-01','2017-02-01','2017-03-01','2017-04-01'];
    // monthProfits.data =['-1','-45','147.4000','147.4000','47.4000','147.4000'];
    // monthProfits.data =[-1,-45,147.4000,147.4000,47.4000,147.4000];
    // monthProfits.data =[{'y':-1},{'y':-45},{'y':147.4000},{'y':93},{'y':-7.5700},{'y':-26.0400}];


    var data8={
        title:'每月收益',
        time: monthProfits.time,
        data: [ { name: '月收益' , data:monthProfits.data } ]
    };

    drawChart2(zhuBar2,data8)
});
//月报表
function drawChart2(id,data){
    var lineColor= ['#f7512b','#27a885'];
    var colors = ['#fbb9bc','#aee7d4'];
    var hoverColors = ['rgba(96,203,155,0.6)'];
    for (var i = 0;i<data.data[0].data.length;i++) {
        if(data.data[0].data[i]>0){
            data.data[0].data[i]={
                y:data.data[0].data[i],
                color:colors[0],
                borderColor:lineColor[0]
            };
        }else{
            data.data[0].data[i]={
                y:data.data[0].data[i],
                color:colors[1],
                borderColor:lineColor[1]
            };
        }

    }
    return new Highcharts.Chart({
        chart: {
            renderTo:id,
            type: 'column',
            options3d: {
                enabled: true,
                alpha: 6,
                beta: 25,
                depth: 70
            }
        },
        title: {
            text: '',
            align: 'left'
        },
        tooltip: {
            formatter:function(){
                var s=this.series.name+' 盈亏点位：'+this.y+'点';//，单量：'+this.point.k+' 单
                return s;
            }
        },
        xAxis: {
            title:{
                text: '点/月',
                align: 'low',
                offset: 0,
                rotation: 0,
                y: 10,
                x: -44,
                labels: {
                    rotation: -45,
                    style: {
                        fontSize: 12,
                        color: '#81818d'
                    }
                }
            },
            categories: Highcharts.getOptions().lang.shortMonths,
            gridLineWidth: 0,
            labels:{
                /*formatter: function () {

                    var value=new Date(this.value);
                    return value.getFullYear()+'-'+((value.getMonth()+1)>=10?(value.getMonth()+1):'0'+(value.getMonth()+1));
                },*/
                autoRotation: false,
                style: {
                    fontSize: 14
                }
            }
        },
        yAxis: {
            //min: -2000,
            //max: 3000,
            //tickAmount: 6,
            title: {
                text: ''
            },
            labels: {
                autoRotation: false,
                style: {
                    fontSize: 14
                }
            }
        },
        credits: {
            enabled: false
        },
        exporting:{
            enabled: false
        },
        plotOptions: {
            series: {
                pointPadding: 0,
                borderWidth: 1
            },column:{
                pointPadding: 0.2,
                borderWidth: 0,
                pointWidth: 30
            }
        },
        legend:{
            enabled:false
        },
        series: data.data
    });
}



/*第六区域折线图*/
// function drawChart6(id,data){
//     return new Highcharts.Chart({
//     chart: {
//                 zoomType: 'x',
//                 renderTo: id
//             },
//             // 删除网站宣传地址
//             credits: {
//                 enabled: false
//             },
//             // 去掉右上角打印提示
//             exporting:{
//                 enabled: false
//             },
//             // 图标标题
//             title: {
//                 text: '',
//                 align: 'left'
//             },
//             subtitle: {
// //                 text: document.ontouchstart === undefined ?
// //                 '鼠标拖动可以进行缩放' : '手势操作进行缩放'
//             },
//             xAxis: {
//                 type: 'datetime',
//                 dateTimeLabelFormats: {
//                     millisecond: '%H:%M:%S.%L',
//                     second: '%H:%M:%S',
//                     minute: '%H:%M',
//                     hour: '%H:%M',
//                     day: '%m-%d',
//                     week: '%m-%d',
//                     month: '%Y-%m',
//                     year: '%Y'
//                 },
//                 title: {
//                     text: '',
//                     align: 'low',
//                     offset: 0,
//                     rotation: 0,
//                     y: 10,
//                     x: -58 ,
//                     labels: {
//                         style: {
//                             fontSize: 12,
//                             color: '#81818d'
//                         }
//                     }
//                 },
//                 labels: {
//                     style: {
//                         fontSize: 14
//                     }
//                 }
//             },
//             // 图例
//             tooltip: {
//                 dateTimeLabelFormats: {
//                     millisecond: '%H:%M:%S.%L',
//                     second: '%H:%M:%S',
//                     minute: '%H:%M',
//                     hour: '%H:%M',
//                     day: '%Y-%m-%d',
//                     week: '%m-%d',
//                     month: '%Y-%m',
//                     year: '%Y'
//                 }
//             },
//             yAxis: {
//                 //tickPositions: [-1000,0,500,1000,1500],
//                 title: {
//                     text: '点位'
//                 },
//                 tickAmount: 5,
//                 labels: {
//                     style: {
//                         fontSize: 14
//                     }
//                 }
//             },
//             legend: {
//                 enabled: false
//             },
//             plotOptions: {
//                 area: {
//                     fillColor: {
//                         linearGradient: {
//                             x1: 0,
//                             y1: 0,
//                             x2: 0,
//                             y2: 1
//                         },
//                         stops: [
//                             [0, Highcharts.getOptions().colors[0]],
//                             [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
//                         ]
//                     },
//                     marker: {
//                         radius: 2
//                     },
//                     lineWidth: 1,
//                     states: {
//                         hover: {
//                             lineWidth: 1
//                         }
//                     },
//                     threshold: null
//                 }
//             },
//             series: [{
//                 type: 'area',
//                 name: '总盈亏点位',
//                 data: data
//             }]
//         })
// }
// 折线图更换为曲线图
function jiaoyiChart(id,data){
    var t = this;
    return new Highcharts.Chart({
        chart: {
            renderTo: id,
            type: "areaspline",
            zoomType: "xy"
        },
        title: {
            text: null
        },
        colors: ["#ffc766"],
        legend: {
            enabled: false
        },
        credits: {
            enabled: false
        },
        exporting: {
            enabled:false
        },
        xAxis: {
            gridLineWidth: 0,
            lineColor: "#cccccc",
            tickColor: "#cccccc",
            gridLineColor: "#f0f0f0",
            categories:data[0],
            tickInterval: Math.ceil(data[0].length / 7),
            
        },
        yAxis: {
            gridLineWidth: 1,
            lineColor: "#cccccc",
            tickColor: "#cccccc",
            gridLineColor: "#f0f0f0",
            title: {
                text: null
            },
            labels: {
//              formatter: function() {
//                  return a.numberFormat(this.value, 0, ".", ",") + " $"
//              }
            }
        },
        tooltip: {
            style: {
                color: "white"
            },
            borderWidth: 0,
            shadow: !1,
            backgroundColor: "rgba(34,34,34, 0.6)",
            shared: !0
        },
        plotOptions: {
            areaspline: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, "#3b9ce0"],
                        [1, Highcharts.Color("#3b9ce0").setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 0,
                    fillColor: "white",
                    lineWidth: 1,
                    lineColor: "#ffc766"
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            },
            series: {
                lineColor: "#3b9ce0"
            }
        },
        series: [{
            name: "盈利点位",
            data: data[1]
        }]
    })
}



// 计算器开始lang
 //可编辑的下拉框==获取select
var engine = $('select[name="f_Amount"]');
//页面加载，初始赋值select选项        
$.get('engines.aspx', function (engineModels) {
        // engines = eval(engineModels);
        for (var i = 0; i < engines.length; i++) {
            engine.append('<option>' + engines[i].Model + '</option>');
        }
})
//绑定值至select（可用于修改） 
if ('<%=order.EngineModel%>') {
    engine.val('<%=order.EngineModel%>');
}
//select的change事件，选中的值赋给input
$('input[name="EngineModel"]').change(function() {
    document.getElementById('inputModel').value = document.getElementById('SelectModel').options[document.getElementById('SelectModel').selectedIndex].value;
})
//可编辑select具体实现
 var focus = false;
$("#inputModel").focus(function () {
    focus = true;
    $(this).next().css('display', 'block');
}).blur(function () {
    if (focus) {
        $(this).next().css('display', 'none');
    }
}).next().mousedown(function () {
    focus = false;
}).change(function () {
    $(this).css('display', 'none').prev().val(this.value);
});

// 计算总收益
$('.l_period>div').click(function(){
    $(this).attr('class','active').siblings().attr('class','');
})
$('.f_people>img').click(function(){
    $(this).attr('src','/ucenter/images/s_people.png');
})
function cal(){
    // 订阅金额
    var f_Amount=Number($.trim($('#inputModel').val()));
    // 订阅仓位
    var f_Position=Number($.trim($('#f_Position option:selected').val()));
    // 交易品种
    var f_Type=$('#f_Type option:selected').val();
    var period_div=$('.l_period>div');
    var people_src=$('.f_people>img');
    for(var i=0; i<period_div.length; i++){
        var period_className=period_div[i].className;

            if(period_className == 'active' && period_div[i].innerHTML == '一周') {
                
            }else if(period_className == 'active' && period_div[i].innerHTML == '一个月') {

            }else {

            }
    }
    // 最大持单==一个分析师3单==3单6单9单
    // 总点位=截止当前总盈利点数
    // 策略盈利单数=总盈利交易几笔
    // 亏损点位=总盈利点数-策略盈利单数
    // 亏损单数=总亏损交易

    // 总收益=订阅金额*订阅仓位/最大持单/250*10*(总点位*策略盈利单数-亏损总点位*亏损单数)
    // var cal_totalProfile=f_Amount*f_Position/

    // 一周1个分析师黄金
    
    // 一周1个分析师非黄金
    // 一周2个分析师黄金
    // 一周2个分析师非黄金
    // 一周3个分析师黄金
    // 一周3个分析师非黄金

    // 一个月1个分析师黄金
    // 一个月1个分析师非黄金
    // 一个月2个分析师黄金
    // 一个月2个分析师非黄金
    // 一个月3个分析师黄金
    // 一个月3个分析师非黄金

    // 全部1个分析师黄金
    // 全部1个分析师非黄金
    // 全部2个分析师黄金
    // 全部2个分析师非黄金
    // 全部3个分析师黄金
    // 全部3个分析师非黄金
    
}
